home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / rotbox.pas < prev    next >
Pascal/Delphi Source File  |  1984-12-03  |  896b  |  71 lines

  1. program rotbox;
  2.    var
  3.      x1,x2,x3,x4,y1,y2,y3,y4 :integer;
  4.      o1,o2,o3,o4,p1,p2,p3,p4 :integer;
  5.  
  6.  
  7. procedure box1;
  8.  
  9. begin;
  10.         draw(x1,x2,y1,y2,1);
  11.         draw(y1,y2,x3,x4,1);
  12.         draw(x3,x4,y3,y4,1);
  13.         draw(y3,y4,x1,x2,1);
  14. end;
  15. procedure passnums;
  16.  
  17. begin;
  18.        o1:=x1;o2:=x2;p1:=y1;p2:=y2;
  19.        o3:=x3;o4:=x4;P3:=y3;P4:=y4;
  20. end;
  21.  
  22.  
  23. procedure erasebox;
  24.  
  25. begin;
  26.         draw(o1,o2,p1,p2,0);
  27.         draw(p1,p2,o3,o4,0);
  28.         draw(o3,o4,p3,p4,0);
  29.         draw(p3,p4,o1,o2,0);
  30. end;
  31.  
  32.  
  33.  
  34.  
  35.  
  36. procedure size;
  37.  
  38. begin;
  39.   box1;
  40.    x1:=x1+1;
  41.    y1:=y1+1;
  42.    x3:=x3-1;
  43.    y3:=y3-1;
  44.   box1;
  45. end;
  46.  
  47.  
  48.  
  49.  
  50. begin;
  51.  
  52.    x1:=50;
  53.    x2:=40;
  54.    y1:=50;
  55.    y2:=100;
  56.    x3:=100;
  57.    x4:=100;
  58.    y3:=100;
  59.    y4:=50;
  60.       graphmode;
  61.  
  62. repeat;
  63.     box1;
  64.     passnums;
  65.     size;
  66.     box1;
  67.     erasebox;
  68. until x1>100;
  69.  
  70. end.
  71.